﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IndustrialControlLibrary
{
    public partial class HMI_O_Value : UserControl
    {
        public HMI_O_Value()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 从connection获取数据用于显示
        /// </summary>
        /// <param name="value"></param>
        public void DisplayValue(string value)
        {
            if (value != null)
            {
                this.Invoke(new Action(() =>
                {
                    this.label1.Text = this.Prefix + value + this.Suffix;
                }));
            }
        }
    }
}
